local thbattle__molisha_jiezou = fk.CreateSkill {

  name = "thbattle__molisha_jiezou",

  tags = {},

}



thbattle__molisha_jiezou:addEffect("active", {
  prompt = "#thbattle__molisha_jiezou",
  anim_type = "control",
  max_phase_use_time = 1,
  target_num = 1,
  card_filter = Util.FalseFunc,
  target_filter = function(self, player, to_select, selected, selected_cards, card, extra_data)
    return #selected == 0 and to_select ~= player and not to_select:isNude()
  end,
  can_use = function(self, player, card, extra_data)
    return player:usedSkillTimes(thbattle__molisha_jiezou.name, Player.HistoryPhase) == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    local target_card = room:askForCardChosen(player, target, "he", thbattle__molisha_jiezou.name,
      "#thbattle__molisha_jiezou-choose_card:" .. target.id)
    room:obtainCard(player, target_card, false, fk.ReasonPrey, player, thbattle__molisha_jiezou.name)
    local choice = room:askForChoice(target,
      { "#thbattle__molisha_jiezou-use_slash:" .. player.id, "Cancel" }, thbattle__molisha_jiezou.name)
    if choice == "#thbattle__molisha_jiezou-use_slash:" .. player.id then
      room:useCard({
        from = target,
        tos = { player },
        card = Fk:cloneCard("danmu__slash"),
      })
    end
  end,
})

return thbattle__molisha_jiezou
